package edu.jmu.transaction;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 使用Sping AOP XML方式进行配置
 * @author zheng
 *
 */
public class TransactionTest2 {
	public static void main(String[] args) {
		
		String xmlpath = "classpath:transaction2.xml";
		ApplicationContext context = new ClassPathXmlApplicationContext(xmlpath);
		AccountService accountService = (AccountService)context.getBean("accountService");
		accountService.transfer("jack", "tom", 1000);
		System.out.println("transfer done");
	}

}
